#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    int n;
    cin >> n;
    int num[n];
    if(n == 1) cout << "0" << endl;
    else{
        for(int i=0;i<n;i++){
            cin >> num[i];
        }
    }
    int max_sum = 0;
    int real_quality = 0;
    sort(num, num+n);
    int max = num[n-1];
    for(int i = 0;i<max;i++){
        int temp_sum = 0;
        for(int j = 0;j<n;j++){
            if(num[i] == i){
                temp_sum++;
            }
        }
        if(temp_sum > max_sum && i > real_quality){
            max_sum = temp_sum;
            real_quality = i;
        }
    }
    cout << max_sum << endl;
    return 0;
}